﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;


namespace WindowsFormsApplication1
{
    class WriteToFile
    {
        public String filename;
        public FileStream sw;

        public WriteToFile(String name, byte[] buf)
        {
            filename = name;
             sw = new FileStream(filename, FileMode.Open, FileAccess.Write);
             sw.Write(buf, 0, buf.Length);
            sw.Close();
        }
    }
}
